<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/





Route::namespace('Admin')->prefix('v1')->middleware('cors','admin.guard')->group(function () {

    Route::post('/addPrint','PrintController@addPrint')->name('admin.addPrint');

    Route::post('/ckeckQr','OrderController@ckeckQr')->name('admin.ckeckQr');  //二维码核销


    Route::post('/adminLogin','LoginController@login')->name('admin.login');  //管理员 登录



    Route::post('/reg','LoginController@store')->name('admin.reg');  //管理员 注册

    Route::get('/getOrderUser','OrderController@getOrderUser')->name('user.getUserRecharge');//获取报名信息记录
    Route::get('/testExport','OrderController@testExport')->name('user.testExport');//获取报名信息记录

    Route::get('/AdList','AdController@AdList')->name('ad.AdList');//管理员用户端公用

    Route::middleware('admin.refresh')->group(function () {

        Route::get('/getAdminMenu','AdminController@getAdminMenu')->name('admin.getAdminMenu');//获取管理员菜单列表

        Route::get('/getAdminList','AdminController@getAdminList')->name('admin.getAdminList');//获取管理员列表

        Route::post('/editAdmin','AdminController@editAdmin')->name('admin.editAdmin');//编辑管理员

        Route::post('/addMenu','AdminController@addMenu')->name('admin.addMenu');//添加菜单
        Route::post('/editMenu','AdminController@editMenu')->name('admin.editMenu');//编辑菜单
        Route::get('/MenuList','AdminController@MenuList')->name('admin.MenuList');//菜单栏列表
        Route::get('/deleteMenu','AdminController@deleteMenu')->name('admin.deleteMenu');//删除菜单

        Route::post('/addRole','AdminController@addRole')->name('admin.addRole');//添角色
        Route::get('/roleList','AdminController@roleList')->name('admin.roleList');//获取角色列表
        Route::get('/roleInfo','AdminController@roleInfo')->name('admin.roleInfo');//获取角色详情

        Route::get('/getActivityList','ActivityController@getActivityList')->name('activity.getActivityList');//活动列表
        Route::get('/getActivityDetail','ActivityController@getActivityDetail')->name('activity.getActivityDetail');//活动详情
        Route::POST('/addActivity','ActivityController@addActivity')->name('activity.addActivity');//添加活动
        Route::POST('/editActivity','ActivityController@editActivity')->name('activity.editActivity');//编辑活动

        Route::get('/getAdmin','ActivityController@getAdminList')->name('activity.getAdmin');//获取管理员列表

        Route::POST('/ActivityIsDel','ActivityController@ActivityIsDel')->name('activity.ActivityIsDel');//活动禁用


        Route::POST('/upload','IndexController@upload')->name('index.upload');//图片上传




        Route::post('/addAdmin','AdminController@addAdmin')->name('admin.addAdmin');//添加管理员
        Route::post('/editAdmin','AdminController@editAdmin')->name('admin.editAdmin');//添加管理员
        Route::get('/deleteAdmin','AdminController@deleteAdmin')->name('admin.deleteAdmin');//删除管理员






        Route::post('/editConfig','ConfigController@editConfig')->name('config.editConfig');//获取角色详情
        Route::get('/getConfigInfo','ConfigController@getConfigInfo')->name('config.getConfigInfo');//获取角色详情


        Route::get('/getUserList','UserController@getUserList')->name('user.getUserList');//获取用户列表

        Route::post('/editUser','UserController@editUser')->name('user.editUser');//编辑用户信息

        Route::get('/getUserInfo','UserController@getUserInfo')->name('user.getUserInfo');//用户详情 基本信息









        Route::get('/getOrderList','OrderController@getOrderList')->name('order.getOrderList');//获取订单列表
        Route::get('/getOrderInfo','OrderController@getOrderInfo')->name('order.getOrderInfo');//获取订单详情

        Route::POST('/CheckOrder','OrderController@CheckOrder')->name('order.CheckOrder');//订单

        Route::post('/addEditAd','AdController@addEditAd')->name('ad.addEditAd');//添加编辑广告
        Route::post('/addEditAbout','AdController@addEditAbout')->name('ad.addEditAbout');//添加编辑关于我们
        Route::get('/getAbout','AdController@getAbout')->name('ad.getAbout');//添加编辑关于我们
        Route::get('/deleteAd','AdController@deleteAd')->name('ad.deleteAd');//添加编辑广告


        Route::post('/addEditDevice','DeviceController@addEditDevice')->name('device.addEditDevice');//添加编辑设备
        Route::get('/deleteDevice','DeviceController@deleteDevice')->name('device.deleteDevice');//删除设备
        Route::get('/deviceList','DeviceController@DeviceList')->name('device.DeviceList');//获取设备列表

        Route::post('/ckeckQrCode','OrderController@ckeckQrCode')->name('admin.ckeckQrCode');  //二维码核销

        Route::get('/getInfoFromQr','OrderController@getInfoFromQr')->name('admin.getInfoFromQr');  //根据二维码获取购票人信息

        Route::post('/AutoCheck','OrderController@AutoCheck')->name('admin.AutoCheck'); //手动核销


    });


});
